import { App } from 'vue';

const files: any = import.meta.glob(['./*.ts'], { eager: true });

export default {
	install: (app: App<Element>): void => {
		Object.keys(files).forEach((key: string) => {
			const name = key.replace(/^./, '').split('/')[1].split('.')[0];
			app.directive(name, files[key].default);
		});
	}
};
